
package ploy.lang;

import java.util.*;
import java.io.*;
import java.math.*;

public class Number extends DynamicObject {
    
    public static String jvmClass = "ploy/lang/Number";
    public static String jvmType = "L" + jvmClass + ";";    

    private BigInteger intVal;

    public boolean isNumber() { return true; }

    public Number( BigInteger i ) {
	intVal = i;
    }

    public Number( String s ) {
	intVal = new BigInteger(s);
    }

    public Number( int i ) {
	intVal = new BigInteger(Integer.toString(i));
    }

    public Number( byte[] b ) {
	intVal = new BigInteger(b);
    }

    public String toString( ) {
	return intVal.toString( );
    }

    public int getIntValue( ) {
	return intVal.intValue( );
    }

    public byte[] toByteArray( ) {
	return intVal.toByteArray( );
    }

}

